public class TWODArrayTest {
	public static void main(String[] args) {
		int[][] arr2d = new int[3][];

		arr2d[0] = getIntArr(1);
		arr2d[1] = getIntArr(2);
		arr2d[2] = getIntArr(3);
		for (int i = 0; i < arr2d.length; i++) {
			for (int j = 0; j < arr2d[i].length; j++) {
				System.out.println(arr2d[i][j]);
			}
			System.out.println();
		}
	}

	static int[] getIntArr(int a) {
		if (a == 1) {
			return new int[] { 1 };
		}
		if (a == 2) {
			return new int[] { 10, 20 };
		}
		if (a == 3) {
			return new int[] { 100, 200, 300 };
		}
		return new int[] {};
	}
}
